home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form SetTabStops
- Caption = "Set Tab Stops:"
- ClientHeight = 2370
- ClientLeft = 1695
- ClientTop = 3045
- ClientWidth = 6195
- Height = 2775
- Left = 1635
- LinkTopic = "Form1"
- ScaleHeight = 2370
- ScaleWidth = 6195
- Top = 2700
- Width = 6315
- Begin TextBox Text2
- Enabled = 0 'False
- Height = 405
- Left = 480
- TabIndex = 6
- Top = 960
- Width = 5535
- End
- Begin CommandButton Command2
- Cancel = -1 'True
- Caption = "Cancel"
- Height = 495
- Left = 3000
- TabIndex = 5
- Top = 1680
- Width = 1215
- End
- Begin CommandButton Command1
- Caption = "OK"
- Default = -1 'True
- Height = 495
- Left = 1440
- TabIndex = 4
- Top = 1680
- Width = 1215
- End
- Begin TextBox Text1
- Height = 315
- Left = 2160
- TabIndex = 3
- Text = "8"
- Top = 240
- Width = 615
- End
- Begin OptionButton Option1
- Caption = "Arbitrary tabs (enter comma-separated list)"
- Height = 375
- Index = 1
- Left = 240
- TabIndex = 2
- Top = 600
- Width = 4335
- End
- Begin OptionButton Option1
- Caption = "Fixed tabs every "
- Height = 375
- Index = 0
- Left = 240
- TabIndex = 1
- Top = 240
- Value = -1 'True
- Width = 1815
- End
- Begin Label Label1
- Caption = "spaces"
- Height = 255
- Left = 3000
- TabIndex = 0
- Top = 360
- Width = 1455
- End
- Sub Command1_Click ()
- Tag = "OK"
- If Option1(0).Value = True Then
- 'Fixed tabs; read value and propogate through
- 'TabStops array
- On Error GoTo badopt1
- For i% = 0 To HIGHEST_TAB
- TabStops(i%) = ((i% + 1) * CInt(Text1.Text)) + 1
- NumTabStops = HIGHEST_TAB + 1
- Next i%
- Else
- 'Arbitrary tabs; parse list and plug into TabStops
- On Error GoTo badopt2
- NextTab$ = StrTok(Text2.Text, " ,")
- i% = 0
- While NextTab$ <> ""
- TabStops(i%) = CInt(NextTab$)
- i% = i% + 1
- NumTabStops = NumTabStops + 1
- NextTab$ = StrTok("", " ,")
- Wend
- TabStops(i%) = 32767 'establish catch-all tab
- End If
- Hide
- Exit Sub
- badopt1:
- MsgBox "Bad tab value entered."
- Text1.SetFocus
- Exit Sub
- badopt2:
- MsgBox "Bad tab value entered."
- Text2.SetFocus
- Exit Sub
- End Sub
- Sub Command2_Click ()
- Tag = "CANCEL"
- Hide
- End Sub
- Sub Option1_Click (Index As Integer)
- If Index = 0 Then
- Text2.Enabled = False
- Text2.Text = ""
- Text1.Enabled = True
- Text1.SetFocus
- Else
- Text2.Enabled = True
- Text1.Enabled = False
- Text1.Text = ""
- Text2.SetFocus
- End If
- End Sub
-